function ccR_Hunter_3()
	if ccrPlayerLevel() >= 10 and ccrPlayerLevel() <= 90 then ccR_Hunter_Survival_10_90() end

	--[[ if ccrPlayerLevel() >= 10 and ccrPlayerLevel() <= 89 then ccR_Hunter_Survival_10_89() end
	if ccrPlayerLevel() == 90 then ccR_Hunter_Survival_90() end
	]]
end	

function ccR_Hunter_Survival_10_90()
	-- Functions
	ccR_Hunter_StartAttack()
	ccR_Hunter_Concussive_Shot()
	ccR_Hunter_Mend_Pet()
	ccR_Scatter_Shot()
	ccR_Scatter_Shot_On_Anyone()
	ccR_Counter_Shot()
	ccR_Counter_Shot_On_Anyone()
	ccR_Hunter_Kill_Shot_Anyone()
	ccR_Hunter_Masters_Call()

	-- Talents
		-- 30
		ccR_Hunter_Binding_Shot()
		ccR_Hunter_Intimidation()
		-- 45
		ccR_Hunter_Exhilaration()
		-- 60
		ccR_Hunter_Fervor()
		ccR_Hunter_Dire_Beast()

	-- Cast Explosive Shot Icon Explosive Shot when you benefit from a Lock and Load proc.
	if ccrPlayerHasSpell(EXPLOSIVE_SHOT)
	and	ccrSpellCanAttack(EXPLOSIVE_SHOT)
	and ccrPlayerHasBuff(LOCK_AND_LOAD)
	then
		ccrCastAttack(EXPLOSIVE_SHOT)
		return
	end		

	-- Trap Launcher
	if ccrPlayerHasSpell(TRAP_LAUNCHER)
	and not ccrPlayerHasBuff(TRAP_LAUNCHER)
	and ccrSpellIsReady(TRAP_LAUNCHER)
	then
		ccrCast(TRAP_LAUNCHER)
		return
	end

	if ccrPlayerIsInCombat() then
		-- Opening Sequence: Rapid Fire
		if ccrPlayerHasSpell(RAPID_FIRE)
		and ccrSpellIsReady(RAPID_FIRE)
		then
			ccrCast(RAPID_FIRE)
			return
		end
		-- Rabid
		if ccrSpellIsReady(RABID)
		and ccrPlayerIsInCombat()
		and ccrPetIsAlive()
		then
			ccrCast(RABID)
		end

		-- Opening Sequence: Stampede
		if ccrTargetIsBoss()
		and ccrPlayerHasSpell(STAMPEDE)
		and ccrSpellCanAttack(STAMPEDE)
		then
			ccrCastAttack(STAMPEDE)
			return
		end
	end
	-- Kill Shot
	if ccrPlayerHasSpell(KILL_SHOT)
	and ccrSpellCanAttack(KILL_SHOT) then
		ccrCastAttack(KILL_SHOT)
		return
	end

	local vCount = ccrTargetCount(10)
	-- Single Target Rotation
	if vCount == 1
	or ccrTargetIsBoss() 
	then
		-- 2 Apply and maintain Serpent Sting Icon Serpent Sting to the target
		if not ccrTargetHasMyDebuff(SERPENT_STING)
		and ccrSpellCanAttack(SERPENT_STING)
		and (vHunter_Survival_LastSerpentStingCast == nil or (GetTime()-vHunter_Survival_LastSerpentStingCast > 2.0))
		then
			ccrCastAttack(SERPENT_STING)
			vHunter_Survival_LastSerpentStingCast = GetTime()
		end
		-- 3 Cast Explosive Shot Icon Explosive Shot on cooldown
		if ccrPlayerHasSpell(EXPLOSIVE_SHOT)
		and ccrSpellCanAttack(EXPLOSIVE_SHOT)
		then
			ccrCastAttack(EXPLOSIVE_SHOT)
			return
		end

		-- 5 Cast Black Arrow Icon Black Arrow on cooldown (if the target will live for the full duration of Black Arrow).
		if ccrPlayerHasSpell(BLACK_ARROW)
		and	ccrSpellCanAttack(BLACK_ARROW) 
		then
			ccrCastAttack(BLACK_ARROW)
			return
		end

		-- Opening Sequence: A Murder of Crows
		ccR_Hunter_A_Murder_Of_Crows()
		-- Opening Sequence: Glaive Toss
		ccR_Hunter_Glaive_Toss()
		-- 6 Cast Arcane Shot Icon Arcane Shot if you have sufficient focus to still execute steps 3 and 5 afterwards.
		if ccrSpellCanAttack(ARCANE_SHOT)
		and ccrSpellIsOnCooldown(EXPLOSIVE_SHOT)
		then
			-- Check all available spells
			local vUseArcaneShot = true
			if ccrPlayerHasSpell(BLACK_ARROW) and not ccrSpellIsOnCooldown(BLACK_ARROW) then vUseArcaneShot = false end
			if ccrPlayerHasTalent(A_MURDER_OF_CROWS) and not ccrSpellIsOnCooldown(A_MURDER_OF_CROWS) then vUseArcaneShot = false end
			if ccrPlayerHasTalent(GLAIVE_TOSS) and not ccrSpellIsOnCooldown(GLAIVE_TOSS) then vUseArcaneShot = false end
			if vUseArcaneShot then
				ccrCastAttack(ARCANE_SHOT)
				return
			end
		end

		-- 7 Cast Cobra Shot Icon Cobra Shot.
		ccR_Hunter_Focus_Shot()
	end

	-- 2-3 Rotation
	if vCount > 1 and vCount < 4 then
		if ccrPlayerHasBuff(TRAP_LAUNCHER)
		and ccrPlayerHasSpell(EXPLOSIVE_TRAP)
		and ccrSpellIsReady(EXPLOSIVE_TRAP)
		and Target and Target:Exists() and Target:GetDistance(Player) < 40
		and not ccrTargetIsMoving()
		then
			ccrCast(EXPLOSIVE_TRAP)
			if SpellIsTargeting() == 1 then CastAtLocation(Target:GetLocation()) end
			return
		end

		if not ccrTargetHasMyDebuff(SERPENT_STING)
		and ccrSpellCanAttack(SERPENT_STING)
		and (vHunter_Survival_LastSerpentStingCast == nil or (GetTime()-vHunter_Survival_LastSerpentStingCast > 2.0))
		then
			ccrCastAttack(SERPENT_STING)
			vHunter_Survival_LastSerpentStingCast = GetTime()
		end

		if ccrPlayerHasSpell(EXPLOSIVE_SHOT)
		and	ccrSpellCanAttack(EXPLOSIVE_SHOT)
		then
			ccrCastAttack(EXPLOSIVE_SHOT)
			return
		end

		if ccrPlayerHasSpell(BLACK_ARROW)
		and ccrSpellCanAttack(BLACK_ARROW)
		then
			ccrCastAttack(BLACK_ARROW)
			return
		end

		-- Opening Sequence: A Murder of Crows
		if ccrPlayerHasTalent(A_MURDER_OF_CROWS) then
			if not ccrSpellIsOnCooldown(A_MURDER_OF_CROWS) then
				if ccrSpellIsReady(A_MURDER_OF_CROWS) then
					if ccrSpellCanAttack(A_MURDER_OF_CROWS) then
						ccrCastAttack(A_MURDER_OF_CROWS)
						return
					end
				else
					ccR_Hunter_Focus_Shot()
				end
			end
		end
		-- Opening Sequence: Glaive Toss
		if ccrPlayerHasTalent(GLAIVE_TOSS) then
			if not ccrSpellIsOnCooldown(GLAIVE_TOSS) then
				if ccrSpellIsReady(GLAIVE_TOSS) then
					if ccrSpellCanAttack(GLAIVE_TOSS) then
						ccrCastAttack(GLAIVE_TOSS)
						return
					end
				else
					ccR_Hunter_Focus_Shot()
				end
			end
		end
		-- Replace Arcane Shot Icon Arcane Shot with Multi-Shot Icon Multi-Shot as your focus dump.
		if ccrPlayerHasSpell(MULTISHOT)
		and	ccrSpellCanAttack(MULTISHOT)
		then
			local vUseMultishot = true
			if ccrPlayerHasSpell(EXPLOSIVE_SHOT) and not ccrSpellIsOnCooldown(EXPLOSIVE_SHOT) then vUseMultishot = false end
			if ccrPlayerHasSpell(BLACK_ARROW) and not ccrSpellIsOnCooldown(BLACK_ARROW) then vUseMultishot = false end
			if vUseMultishot then
				ccrCastAttack(MULTISHOT)
				return
			end
		end
		-- If the player doesn't have muilti-shot yet
		if not ccrPlayerHasSpell(MULTISHOT) then
			if ccrSpellCanAttack(ARCANE_SHOT)
			and ccrSpellIsOnCooldown(EXPLOSIVE_SHOT)
			then
				-- Check all available spells
				local vUseArcaneShot = true
				if ccrPlayerHasSpell(BLACK_ARROW) and not ccrSpellIsOnCooldown(BLACK_ARROW) then vUseArcaneShot = false end
				if ccrPlayerHasTalent(A_MURDER_OF_CROWS) and not ccrSpellIsOnCooldown(A_MURDER_OF_CROWS) then vUseArcaneShot = false end
				if ccrPlayerHasTalent(GLAIVE_TOSS) and not ccrSpellIsOnCooldown(GLAIVE_TOSS) then vUseArcaneShot = false end
				if vUseArcaneShot then
					ccrCastAttack(ARCANE_SHOT)
					return
				end
			end
		end

		ccR_Hunter_Focus_Shot()
	end
	-- 4+ Rotation
	if vCount >= 4 then
		-- Explosive Trap
		if ccrPlayerHasBuff(TRAP_LAUNCHER)
		and ccrPlayerHasSpell(EXPLOSIVE_TRAP)
		and ccrSpellIsReady(EXPLOSIVE_TRAP)
		and Target and Target:Exists() and Target:GetDistance(Player) < 40
		and not ccrTargetIsMoving()
		then
			ccrCast(EXPLOSIVE_TRAP)
			if SpellIsTargeting() == 1 then CastAtLocation(Target:GetLocation()) end
			return
		end
		-- Cast Multi-Shot Icon Multi-Shot as often as your focus allows.
		if ccrPlayerHasSpell(MULTISHOT)
		and ccrSpellCanAttack(MULTISHOT)
		then
			ccrCastAttack(MULTISHOT)
			return
		end
		-- For before the player has Multi-shot
		if not ccrPlayerHasSpell(MULTISHOT) then
			if ccrPlayerHasSpell(EXPLOSIVE_SHOT)
			and ccrSpellCanAttack(EXPLOSIVE_SHOT)
			then
				ccrCastAttack(EXPLOSIVE_SHOT)
				return
			end			
			if ccrSpellCanAttack(ARCANE_SHOT)
			and ccrSpellIsOnCooldown(EXPLOSIVE_SHOT)
			then
				-- Check all available spells
				local vUseArcaneShot = true
				if ccrPlayerHasSpell(BLACK_ARROW) and not ccrSpellIsOnCooldown(BLACK_ARROW) then vUseArcaneShot = false end
				if ccrPlayerHasTalent(A_MURDER_OF_CROWS) and not ccrSpellIsOnCooldown(A_MURDER_OF_CROWS) then vUseArcaneShot = false end
				if ccrPlayerHasTalent(GLAIVE_TOSS) and not ccrSpellIsOnCooldown(GLAIVE_TOSS) then vUseArcaneShot = false end
				if vUseArcaneShot then
					ccrCastAttack(ARCANE_SHOT)
					return
				end
			end
		end		
	
		-- Cast Cobra Shot Icon Cobra Shot whenever you have insufficient focus for Multi-Shot.
		ccR_Hunter_Focus_Shot()
	end
end


--[[
function ccR_Hunter_Survival_10_89()
	if ccrValidTarget() then
		-- Functions
		ccR_Hunter_StartAttack()
		ccR_Hunter_Concussive_Shot()

		-- Does the player have a real AoE?
		if ccrPlayerHasSpell(MULTI_SHOT) then
			-- Single Target Rotation
			local vCount = ccrTargetCount(12)
			if (ccRS.Auto_AoE and (vCount >= 1 and vCount <= ccRS.Hunter_3_SingleTargetCount))
			or (ccrTargetIsBoss() and ccRS.Auto_AoE_Ignore_On_Boss)
			or (not ccRS.Auto_AoE and not ccRS.Manual_AoE)
			then
				ccR_Hunter_Serpent_Sting_All()

				ccR_Hunter_Serpent_Sting()
				ccR_Hunter_Explosive_Shot()
				ccR_Hunter_Black_Arrow()
				ccR_Hunter_Arcane_Shot()
				ccR_Hunter_Focus_Shot()
			end
			-- AoE Rotation
			if (ccRS.Auto_AoE and vCount >= ccRS.Hunter_3_AoECount)
			or (not ccRS.Auto_AoE and ccRS.Manual_AoE)
			then
				ccR_Hunter_Multi_Shot()
				ccR_Hunter_Focus_Shot()
			end
		else
			-- No real AoE
			ccR_Hunter_Serpent_Sting_All()
			ccR_Hunter_Explosive_Shot()
			ccR_Hunter_Arcane_Shot()
			ccR_Hunter_Focus_Shot()
		end
	end
end

function ccR_Hunter_Survival_90()
	--
	--	Icy-Veins 5.4
	--	http://www.icy-veins.com/wow/survival-hunter-pve-dps-rotation-cooldowns-abilities
	--
	--	written: 15/08/2014
	
	-- You should always have an Aspect active. As a Survival Hunter, you should always be using Aspect of the Hawk Icon Aspect of the Hawk.
	if not ccrPlayerHasBuff(ASPECT_OF_THE_IRON_HAWK)
	and ccrPlayerHasSpell(ASPECT_OF_THE_IRON_HAWK)
	and ccrSpellIsReady(ASPECT_OF_THE_IRON_HAWK)
	then
		ccrCast(ASPECT_OF_THE_IRON_HAWK)
		return
	end

	-- Proc's
	if ccrSpellCanAttack(EXPLOSIVE_SHOT)
	and ccrPlayerHasBuff(LOCK_AND_LOAD)
	then
		ccrCastAttack(EXPLOSIVE_SHOT)
		return
	end
	if ccrSpellCanAttack(KILL_SHOT) then
		ccrCastAttack(KILL_SHOT)
		return
	end
	-- Rabid
	if ccrSpellIsReady(53401)
	and ccrPlayerIsInCombat()
	and ccrPetIsAlive()
	then
		ccrCast(53401)
	end

	local vCount = ccrTargetCount(10)
	-- Single Target Rotation
	if vCount == 1
	or ccrTargetIsBoss() 
	then
		-- 1 Apply Hunter's Mark Icon Hunter's Mark on the target.
		if not ccrTargetHasDebuff(HUNTERS_MARK) then
			if ccrPlayerFocus() >= 90
			and ccrSpellCanAttack(ARCANE_SHOT)
			then
				ccrCastAttack(ARCANE_SHOT)
				return
			else
				ccrCast(HUNTERS_MARK)
			end
			return
		end
		-- 2 Apply and maintain Serpent Sting Icon Serpent Sting to the target
		if not ccrTargetHasMyDebuff(SERPENT_STING)
		and ccrSpellCanAttack(SERPENT_STING)
		and (vHunter_Survival_LastSerpentStingCast == nil or (GetTime()-vHunter_Survival_LastSerpentStingCast > 2.0))
		then
			ccrCastAttack(SERPENT_STING)
			vHunter_Survival_LastSerpentStingCast = GetTime()
		end
		-- 3 Cast Explosive Shot Icon Explosive Shot on cooldown
		if ccrSpellCanAttack(EXPLOSIVE_SHOT) then
			ccrCastAttack(EXPLOSIVE_SHOT)
			return
		end
		-- 4 Cast Kill Shot Icon Kill Shot (when target is below 20% health).
		if ccrSpellCanAttack(KILL_SHOT) then
			ccrCastAttack(KILL_SHOT)
			return
		end
		-- 5 Cast Black Arrow Icon Black Arrow on cooldown (if the target will live for the full duration of Black Arrow).
		if ccrSpellCanAttack(BLACK_ARROW) then
			ccrCastAttack(BLACK_ARROW)
			return
		end
		-- Opening Sequence: Rapid Fire
		if ccrSpellIsReady(RAPID_FIRE) then
			ccrCast(RAPID_FIRE)
			return
		end
		-- Opening Sequence: Stampede
		if ccrTargetIsBoss()
		and ccrSpellCanAttack(STAMPEDE)
		then
			ccrCastAttack(STAMPEDE)
			return
		end
		-- Opening Sequence: Fervor
		if ccrPlayerHasTalent(FERVOR)
		and ccrSpellIsReady(FERVOR)
		and ccrPlayerFocus() <= 50
		then
			ccrCast(FERVOR)
			return
		end
		-- Opening Sequence: A Murder of Crows
		if ccrPlayerHasTalent(A_MURDER_OF_CROWS) then
			if not ccrSpellIsOnCooldown(A_MURDER_OF_CROWS) then
				if ccrSpellIsReady(A_MURDER_OF_CROWS) then
					if ccrSpellCanAttack(A_MURDER_OF_CROWS) then
						ccrCastAttack(A_MURDER_OF_CROWS)
						return
					end
				else
					if ccrSpellCanAttack(COBRA_SHOT) then
						ccrCastAttack(COBRA_SHOT)
						return
					end
				end
			end
		end
		-- Opening Sequence: Glaive Toss
		if ccrPlayerHasTalent(GLAIVE_TOSS) then
			if not ccrSpellIsOnCooldown(GLAIVE_TOSS) then
				if ccrSpellIsReady(GLAIVE_TOSS) then
					if ccrSpellCanAttack(GLAIVE_TOSS) then
						ccrCastAttack(GLAIVE_TOSS)
						return
					end
				else
					if ccrSpellCanAttack(COBRA_SHOT) then
						ccrCastAttack(COBRA_SHOT)
						return
					end
				end
			end
		end
		-- 6 Cast Arcane Shot Icon Arcane Shot if you have sufficient focus to still execute steps 3 and 5 afterwards.
		if ccrSpellCanAttack(ARCANE_SHOT)
		and ccrSpellIsOnCooldown(EXPLOSIVE_SHOT)
		and ccrSpellIsOnCooldown(BLACK_ARROW)
		and ccrSpellIsOnCooldown(A_MURDER_OF_CROWS)
		and ccrSpellIsOnCooldown(GLAIVE_TOSS)
		then
			ccrCastAttack(ARCANE_SHOT)
			return
		end
		-- 7 Cast Cobra Shot Icon Cobra Shot.
		if ccrSpellCanAttack(COBRA_SHOT) then
			ccrCastAttack(COBRA_SHOT)
			return
		end
	end

	-- 2-3 Rotation
	if vCount > 1 and vCount < 4 then
		if not ccrTargetHasDebuff(HUNTERS_MARK) then
			if ccrPlayerFocus() >= 90
			and ccrSpellCanAttack(ARCANE_SHOT)
			then
				ccrCastAttack(ARCANE_SHOT)
				return
			else
				ccrCast(HUNTERS_MARK)
			end
			return
		end
		-- Place an Explosive Trap Icon Explosive Trap, assuming that at least two targets will remain in the area affected by your trap.
		if not ccrPlayerHasBuff(TRAP_LAUNCHER)
		and ccrSpellIsReady(TRAP_LAUNCHER)
		then
			ccrCast(TRAP_LAUNCHER)
			return
		end
		if ccrPlayerHasBuff(TRAP_LAUNCHER)
		and ccrSpellIsReady(EXPLOSIVE_TRAP)
		and Target:GetDistance(Player) < 40
		then
			ccrCast(EXPLOSIVE_TRAP)
			if SpellIsTargeting() == 1 then CastAtLocation(Target:GetLocation()) end
			return
		end
		if not ccrTargetHasMyDebuff(SERPENT_STING)
		and ccrSpellCanAttack(SERPENT_STING)
		and (vHunter_Survival_LastSerpentStingCast == nil or (GetTime()-vHunter_Survival_LastSerpentStingCast > 2.0))
		then
			ccrCastAttack(SERPENT_STING)
			vHunter_Survival_LastSerpentStingCast = GetTime()
		end
		if ccrSpellCanAttack(EXPLOSIVE_SHOT) then
			ccrCastAttack(EXPLOSIVE_SHOT)
			return
		end
		if ccrSpellCanAttack(KILL_SHOT) then
			ccrCastAttack(KILL_SHOT)
			return
		end
		if ccrSpellCanAttack(BLACK_ARROW) then
			ccrCastAttack(BLACK_ARROW)
			return
		end
		-- Opening Sequence: Rapid Fire
		if ccrSpellIsReady(RAPID_FIRE) then
			ccrCast(RAPID_FIRE)
			return
		end
		-- Opening Sequence: Stampede
		if ccrTargetIsBoss()
		and ccrSpellCanAttack(STAMPEDE)
		then
			ccrCastAttack(STAMPEDE)
			return
		end
		-- Opening Sequence: Fervor
		if ccrPlayerHasTalent(FERVOR)
		and ccrSpellIsReady(FERVOR)
		and ccrPlayerFocus() <= 50
		then
			ccrCast(FERVOR)
			return
		end
		-- Opening Sequence: A Murder of Crows
		if ccrPlayerHasTalent(A_MURDER_OF_CROWS) then
			if not ccrSpellIsOnCooldown(A_MURDER_OF_CROWS) then
				if ccrSpellIsReady(A_MURDER_OF_CROWS) then
					if ccrSpellCanAttack(A_MURDER_OF_CROWS) then
						ccrCastAttack(A_MURDER_OF_CROWS)
						return
					end
				else
					if ccrSpellCanAttack(COBRA_SHOT) then
						ccrCastAttack(COBRA_SHOT)
						return
					end
				end
			end
		end
		-- Opening Sequence: Glaive Toss
		if ccrPlayerHasTalent(GLAIVE_TOSS) then
			if not ccrSpellIsOnCooldown(GLAIVE_TOSS) then
				if ccrSpellIsReady(GLAIVE_TOSS) then
					if ccrSpellCanAttack(GLAIVE_TOSS) then
						ccrCastAttack(GLAIVE_TOSS)
						return
					end
				else
					if ccrSpellCanAttack(COBRA_SHOT) then
						ccrCastAttack(COBRA_SHOT)
						return
					end
				end
			end
		end
		-- Replace Arcane Shot Icon Arcane Shot with Multi-Shot Icon Multi-Shot as your focus dump.
		if ccrSpellCanAttack(MULTISHOT)
		and ccrSpellIsOnCooldown(EXPLOSIVE_SHOT)
		and ccrSpellIsOnCooldown(BLACK_ARROW)
		then
			ccrCastAttack(MULTISHOT)
			return
		end
		if ccrSpellCanAttack(COBRA_SHOT) then
			ccrCastAttack(COBRA_SHOT)
			return
		end
	end
	-- 4+ Rotation
	if vCount >= 4 then
		-- Cast Multi-Shot Icon Multi-Shot as often as your focus allows.
		if ccrSpellCanAttack(MULTISHOT) then
			ccrCastAttack(MULTISHOT)
			return
		end
		-- Place an Explosive Trap Icon Explosive Trap under the enemies, provided that they are stacking.
		if not ccrPlayerHasBuff(TRAP_LAUNCHER)
		and ccrSpellIsReady(TRAP_LAUNCHER)
		then
			ccrCast(TRAP_LAUNCHER)
			return
		end
		-- Explosive Trap
		if ccrPlayerHasBuff(TRAP_LAUNCHER)
		and ccrSpellIsReady(EXPLOSIVE_TRAP)
		and Target:GetDistance(Player) < 40
		then
			ccrCast(EXPLOSIVE_TRAP)
			if SpellIsTargeting() == 1 then CastAtLocation(Target:GetLocation()) end
			return
		end
		-- Cast Black Arrow Icon Black Arrow on cooldown.
		if ccrSpellCanAttack(BLACK_ARROW) then
			ccrCastAttack(BLACK_ARROW)
			return
		end
		-- Opening Sequence: Rapid Fire
		if ccrSpellIsReady(RAPID_FIRE) then
			ccrCast(RAPID_FIRE)
			return
		end
		-- Opening Sequence: Stampede
		if ccrTargetIsBoss()
		and ccrSpellCanAttack(STAMPEDE)
		then
			ccrCastAttack(STAMPEDE)
			return
		end
		-- Opening Sequence: Fervor
		if ccrPlayerHasTalent(FERVOR)
		and ccrSpellIsReady(FERVOR)
		and ccrPlayerFocus() <= 50
		then
			ccrCast(FERVOR)
			return
		end
		-- Opening Sequence: A Murder of Crows
		if ccrPlayerHasTalent(A_MURDER_OF_CROWS) then
			if not ccrSpellIsOnCooldown(A_MURDER_OF_CROWS) then
				if ccrSpellIsReady(A_MURDER_OF_CROWS) then
					if ccrSpellCanAttack(A_MURDER_OF_CROWS) then
						ccrCastAttack(A_MURDER_OF_CROWS)
						return
					end
				else
					if ccrSpellCanAttack(COBRA_SHOT) then
						ccrCastAttack(COBRA_SHOT)
						return
					end
				end
			end
		end
		-- Opening Sequence: Glaive Toss
		if ccrPlayerHasTalent(GLAIVE_TOSS) then
			if not ccrSpellIsOnCooldown(GLAIVE_TOSS) then
				if ccrSpellIsReady(GLAIVE_TOSS) then
					if ccrSpellCanAttack(GLAIVE_TOSS) then
						ccrCastAttack(GLAIVE_TOSS)
						return
					end
				else
					if ccrSpellCanAttack(COBRA_SHOT) then
						ccrCastAttack(COBRA_SHOT)
						return
					end
				end
			end
		end
		-- Cast Explosive Shot Icon Explosive Shot when you benefit from a Lock and Load proc.
		if ccrSpellCanAttack(EXPLOSIVE_SHOT)
		and ccrPlayerHasBuff(LOCK_AND_LOAD)
		then
			ccrCastAttack(EXPLOSIVE_SHOT)
			return
		end		
		-- Cast Kill Shot Icon Kill Shot (when target is below 20% health).
		if ccrSpellCanAttack(KILL_SHOT) then
			ccrCastAttack(KILL_SHOT)
			return
		end
		-- Cast Cobra Shot Icon Cobra Shot whenever you have insufficient focus for Multi-Shot.
		if ccrSpellCanAttack(COBRA_SHOT) then
			ccrCastAttack(COBRA_SHOT)
			return
		end
	end
end

function ccR_Hunter_Survival_90_Cooldowns()
	if ccrPlayerIsInCombat() then
		-- Opening Sequence: Rapid Fire
		if ccrPlayerHasSpell(RAPID_FIRE)
		and	ccrSpellIsReady(RAPID_FIRE)
		then
			ccrCast(RAPID_FIRE)
			return
		end
	end
	-- Opening Sequence: Fervor
	if ccrPlayerHasTalent(FERVOR)
	and ccrSpellIsReady(FERVOR)
	and ccrPlayerFocus() <= 50
	then
		ccrCast(FERVOR)
		return
	end
	-- Opening Sequence: A Murder of Crows
	if ccrPlayerHasTalent(A_MURDER_OF_CROWS) then
		if not ccrSpellIsOnCooldown(A_MURDER_OF_CROWS) then
			if ccrSpellIsReady(A_MURDER_OF_CROWS) then
				if ccrSpellCanAttack(A_MURDER_OF_CROWS) then
					ccrCastAttack(A_MURDER_OF_CROWS)
					return
				end
			else
				ccR_Hunter_Focus_Shot()
			end
		end
	end
	-- Opening Sequence: Glaive Toss
	if ccrPlayerHasTalent(GLAIVE_TOSS) then
		if not ccrSpellIsOnCooldown(GLAIVE_TOSS) then
			if ccrSpellIsReady(GLAIVE_TOSS) then
				if ccrSpellCanAttack(GLAIVE_TOSS) then
					ccrCastAttack(GLAIVE_TOSS)
					return
				end
			else
				ccR_Hunter_Focus_Shot()
			end
		end
	end
	-- Opening Sequence: Stampede
	if ccrTargetIsBoss()
	and ccrSpellCanAttack(STAMPEDE)
	then
		ccrCastAttack(STAMPEDE)
		return
	end
end
]]